<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%orders_repair}}".
 *
 * @property integer $id
 * @property integer $orders_id
 * @property integer $orders_item_id
 * @property string $title
 * @property string $content
 * @property integer $status
 * @property string $image
 * @property string $type
 * @property integer $created_at
 * @property integer $admin_id
 * @property string $remarks
 * @property integer $handle_at
 */
class OrdersRepair extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%orders_repair}}';
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['orders_id', 'orders_item_id', 'status', 'created_at', 'admin_id', 'handle_at'], 'integer'],
            [['content'], 'string'],
            [['title'], 'string', 'max' => 100],
            [['image', 'remarks'], 'string', 'max' => 255],
            [['type'], 'string', 'max' => 20]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增编码'),
            'orders_id' => Yii::t('zhtfrontend', '订单id'),
            'orders_item_id' => Yii::t('zhtfrontend', '订单项id'),
            'title' => Yii::t('zhtfrontend', '标题'),
            'content' => Yii::t('zhtfrontend', '申请原因'),
            'status' => Yii::t('zhtfrontend', '申请状态（0 提交申请 ；1 审核通过 2 审核失败）'),
            'image' => Yii::t('zhtfrontend', '附加图'),
            'type' => Yii::t('zhtfrontend', '申请售后服务类型（replace换货/return退货）'),
            'created_at' => Yii::t('zhtfrontend', '申请时间'),
            'admin_id' => Yii::t('zhtfrontend', '管理员id'),
            'remarks' => Yii::t('zhtfrontend', '管理员备注'),
            'handle_at' => Yii::t('zhtfrontend', '处理时间'),
        ];
    }
}
